FROM http-req:tag as base

WORKDIR /srv/app

RUN rm -rf ./*

COPY . .

RUN mvn clean package -DskipTests

# 部署镜像
FROM openjdk:17 as deploy

WORKDIR /srv/app

COPY --from=base /srv/app/application/target/*-boot.jar ./

CMD source ./.env && java $JAVA_OPTS -jar ./*-boot.jar

EXPOSE 1883 3000 7070 8080 8081 9090 5653/udp
